<div class="dashboard-page">
    <!-- 页面标题 -->
    <div class="mb-4">
        <h2>📊 数据看板</h2>
        <p class="text-muted">系统数据概览</p>
    </div>

    <!-- 统计卡片 -->
    <div class="row mb-4">
        <div class="col-md-3">
            <div class="card border-primary">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">问句总数</h6>
                            <h2 class="mb-0" id="totalQuestions">0</h2>
                        </div>
                        <div class="text-primary" style="font-size: 3rem;">📝</div>
                    </div>
                    <div class="mt-2">
                        <small class="text-muted">启用: <span id="enabledQuestions">0</span></small>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card border-success">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">我方产品</h6>
                            <h2 class="mb-0" id="totalOurProducts">0</h2>
                        </div>
                        <div class="text-success" style="font-size: 3rem;">📦</div>
                    </div>
                    <div class="mt-2">
                        <small class="text-muted">在售: <span id="onSaleOurProducts">0</span></small>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card border-warning">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">竞品总数</h6>
                            <h2 class="mb-0" id="totalCompetitors">0</h2>
                        </div>
                        <div class="text-warning" style="font-size: 3rem;">🔍</div>
                    </div>
                    <div class="mt-2">
                        <small class="text-muted">直接竞品: <span id="directCompetitors">0</span></small>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-3">
            <div class="card border-info">
                <div class="card-body">
                    <div class="d-flex justify-content-between align-items-center">
                        <div>
                            <h6 class="text-muted mb-2">竞品关联</h6>
                            <h2 class="mb-0" id="totalCompetitorRelations">0</h2>
                        </div>
                        <div class="text-info" style="font-size: 3rem;">🔗</div>
                    </div>
                    <div class="mt-2">
                        <small class="text-muted">强竞争: <span id="highStrengthRelations">0</span></small>
                    </div>
                </div>
            </div>
        </div>
    </div>

    <!-- 图表区域 -->
    <div class="row mb-4">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h5 class="mb-0">问句类别分布</h5>
                </div>
                <div class="card-body">
                    <div id="questionCategoryChart" style="height: 300px;"></div>
                </div>
            </div>
        </div>
        
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h5 class="mb-0">产品类别分布</h5>
                </div>
                <div class="card-body">
                    <div id="productCategoryChart" style="height: 300px;"></div>
                </div>
            </div>
        </div>
    </div>

    <!-- 最近添加 -->
    <div class="row">
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h5 class="mb-0">最近添加的问句</h5>
                </div>
                <div class="card-body">
                    <div class="list-group" id="recentQuestions">
                        <div class="text-center text-muted py-3">加载中...</div>
                    </div>
                </div>
            </div>
        </div>
        
        <div class="col-md-6">
            <div class="card">
                <div class="card-header">
                    <h5 class="mb-0">最近添加的产品</h5>
                </div>
                <div class="card-body">
                    <div class="list-group" id="recentProducts">
                        <div class="text-center text-muted py-3">加载中...</div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

<!-- 加载看板JS -->
<script src="/assets/js/pages/dashboard.js?v=20251011-4"></script>

